@dataknut)If you wish to refer to any of the material from this report please cite as:
Report circulation:
This work is (c) 2020 the University of Southampton.
I usually do energy demand research but in the absence of access to real time demand data on lockdown (unlike during the World Cup) I’m looking at other things.
Data for Southampton downloaded from :
The data that goes to AURN is then ratifified to check for outliers and instrument/measurement error. AURN data less than six months old has not undergone this process.
We use the excellent openair package (Carslaw and Ropkins 2012) to download the AURN data and create the wind and pollution roses for each site.
years <- c("2016", "2017", "2018","2019","2020")
sites <- c("SA33", "SOUT")
for(y in years){
# wide form
for(s in sites){
df <- openair::importAURN(
site = s,
year = y,
pollutant = "all",
hc = FALSE,
to_narrow = FALSE, # produces wide form data
verbose = TRUE
)
# make a compass rose for this site for this year
message("Wind rose: ", y, " (Southampton - ", s, ")")
lab <- paste0("Southampton: ", s, " (",y,")")
openair::windRose(df , key.header = paste0("Southampton site: ", s, " (",y,")"))
message("Pollution rose: ", y, " (Southampton - ", s, ")")
openair::pollutionRose(df, key.header = paste0("Southampton site: ", s, " (",y,")"))
}
}
# done ----
Report generated using knitr in RStudio with R version 3.6.3 (2020-02-29) running on x86_64-apple-darwin15.6.0 (Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64).
t <- proc.time() - myParams$startTime
elapsed <- t[[3]]
Analysis completed in 41.559 seconds ( 0.69 minutes).
R packages used:
Carslaw, David C., and Karl Ropkins. 2012. “Openair — an R Package for Air Quality Data Analysis.” Environmental Modelling & Software 27–28 (0): 52–61. https://doi.org/10.1016/j.envsoft.2011.09.008.
Müller, Kirill. 2017. Here: A Simpler Way to Find Your Files. https://CRAN.R-project.org/package=here.